<!doctype html>
<html>
<head>
    <meta charset=utf-8>
    <title></title>
    <meta name="robots" content="noindex,nofollow">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="<?=Web_Path?>packs/layui/css/layui.css">
    <link rel="stylesheet" href="<?=Web_Path?>packs/admin/css/font.css">
    <link rel="stylesheet" href="<?=Web_Path?>packs/admin/css/style.css">
    <script src="<?=Web_Path?>packs/js/jquery.min.js"></script>
    <script src="<?=Web_Path?>packs/layui/layui.js"></script>
    <script src="<?=Web_Path?>packs/admin/js/cscms.js"></script>
</head>
<body>
    <span class="layui-breadcrumb" >
        <a ><cite><i class="fa fa-map-marker"></i>位置</cite></a>
        <a href="<?=site_url('vod/admin/vod')?>">音乐</a>
        <a href="<?=site_url('vod/admin/type')?>">歌曲分类</a>
    </span>
    <form class="layui-form" action="<?=site_url('vod/admin/type/plsave')?>" method="post">
    <table class="layui-table">
        <thead>
        <tr>
            <th>编号/名称</th>
            <th class="phide">排序</th>
            <th>中文名</th>
            <th>状态</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <?php
            foreach ($vod_type as $row) {
                echo '<tr>
                    <td>'.$row->id.'、'.$row->name.'</td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td>
                    <a class="layui-btn layui-btn-mini layui-btn-normal" href="javascript:cscms.get_open(\''.site_url('vod/admin/type/edit').'?cid='.$row->id.'\',\'新增剧情\',\'500px\',\'370px\');">新增剧情</a>
                    </td>
                    </tr>';
                $sql_string = "SELECT * FROM ".CS_SqlPrefix."vod_type where cid=".$row->id." order by xid asc";
                $query = $this->db->query($sql_string); 
                foreach ($query->result() as $rows) {
                    //状态
                    $zt=($rows->yid==0)?'<a title="点击隐藏" href="javascript:cscms.ok_no(\''.site_url('vod/admin/type/init').'\','.$rows->id.',0,\'zt_\');"><i class="fa fa-check colorl"></i></a>':'<a title="点击显示" href="javascript:cscms.ok_no(\''.site_url('vod/admin/type/init').'\','.$rows->id.',1,\'zt_\');"><i class="fa fa-close colorr"></i></a>';
                    echo '<tr id="row_'.$rows->id.'">
                    <td><input name="id['.$rows->id.']" class="xuan" type="checkbox" value="'.$rows->id.'">&nbsp;&nbsp;├&nbsp;'.$rows->id.'、'.$rows->name.'</td>
                    <td align="center"><input class="td-input2" style="width:45px;" name="xid_'.$rows->id.'" value="'.$rows->xid.'"></td>
                    <td align="center"><input class="td-input2" style="width:90px;" name="name_'.$rows->id.'" value="'.$rows->name.'"></td>
                    <td align="center" id="zt_'.$rows->id.'">'.$zt.'</td>
                    <td>
                    <a class="layui-btn layui-btn-mini" href="javascript:cscms.get_open(\''.site_url('vod/admin/type/edit').'?id='.$rows->id.'\',\'修改剧情\',\'500px\',\'370px\')">修改</a>
                    <a class="layui-btn layui-btn-danger layui-btn-mini" href="javascript:cscms.del_one(\''.site_url('vod/admin/type/del').'\','.$rows->id.')">删除</a>
                    </td>
                    </tr>';
                }
            }
        ?>
        </tbody>
    </table>
    <div class="more_func">
        <a class="layui-btn layui-btn-primary layui-btn-small" href="javascript:cscms.select_all();"><i class="fa fa-check colorl" ></i>全选/反选</a>
        <a class="layui-btn layui-btn-primary layui-btn-small" lay-submit lay-filter="setting"><i class="fa fa-pencil colorb"></i>修改选中</a>
    </div>
    </form>
    <script type="text/javascript">
        cscms.init();
    </script>
</body>
</html>